package com.chrray.position.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.chrray.position.enums.YesNoEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 用户资质证书 对象
 *
 * @author wusiwee
 * @email wusiwee@163.com
 * @since 1.0.1 2024-08-07
 */

@Data
@ApiModel(description = "用户技能")
@TableName("fd_user_skill")
public class FdUserSkill extends Model<FdUserSkill> {
	@TableId(type = IdType.AUTO)
	private Long id;

	@ApiModelProperty(value = "用户ID")
	private Long userId;

	@ApiModelProperty(value = "技能名称")
	private String skillName;

	@ApiModelProperty(value = "排序")
	private Integer sort;

	@ApiModelProperty(value = "创建时间")
	private Date createTime;

	@ApiModelProperty(value = "删除标识")
	private Integer delFlag;

	public static List<FdUserSkill> findByUserId(Long userId) {
		LambdaQueryWrapper<FdUserSkill> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(FdUserSkill::getUserId, userId);
		return new FdUserSkill().selectList(queryWrapper);
	}
}
